package com.lipy.dubboconsumer.controller;

import com.lipy.dubboconsumer.service.AopFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("aop")
public class AopDemoController {

    @Autowired
    AopFlowService aopFlowService;
    @GetMapping("demo")
    public void demo(){
        aopFlowService.demo();
    }

    @GetMapping("get")
    public Object get(){
        Object o = aopFlowService.get();
        return o;
    }

    @GetMapping("throw")
    public Object throwe(){
        Object throwe = aopFlowService.throwe();
        return throwe;
    }
}
